Inside Macintosh: QuickTime Components
| Previous | Chapter contents | Chapter top | Section top | Next |
Movie data export components may provide one or two functions that allow the Movie Toolbox to request a data conversion operation. The MovieExportToHandle function instructs your component to place the converted data into a specified handle. The MovieExportToFile function instructs you to put the data into a file. You should set the appropriate flags in your component's componentFlags field to indicate which of these functions your component supports. Note that your component may support both functions.
Before the Movie Toolbox calls one of these functions, a requesting application may call one or more of your component's configuration functions (see "Configuring Movie Data Export Components" for more information about these functions). However, your component should work properly even if none of these configuration functions is called.
The MovieExportToHandle function allows the Movie Toolbox to export data from a movie, using your movie data export component.
pascal ComponentResult MovieExportToHandle
(MovieImportComponent ci,
&nsp; Handle dataH, Movie theMovie,
Track onlyThisTrack,
TimeValue startTime,
TimeValue duration);
The Movie Toolbox calls the MovieExportToHandle function in order to export movie data into a handle. Your component must read the data from the specified movie or track, perform appropriate conversions on that data, and place the data into the handle. The data stored in the handle must have a data type that corresponds to the component subtype of your movie data export component.
If your component can write data to a handle, be sure to set the canMovieExportHandles flag in your component's componentFlags field.
Your component must be prepared to perform this function at any time. You should not expect that any of your component's configuration functions will be called first.
The MovieExportToFile function allows the Movie Toolbox to export data to a file, using your movie data export component.
pascal ComponentResult MovieExportToFile (MovieImportComponent ci,
const FSSpec *theFile,
Movie theMovie,
Track onlyThisTrack,
TimeValue startTime,
TimeValue duration);
The Movie Toolbox calls the MovieExportToFile function in order to export movie data into a file. Your component must read the data from the track or movie, perform appropriate conversions on that data, and place the data into the specified file. The file's type corresponds to the component subtype of your movie data export component.
Note that the requesting program or toolbox must create the destination file before calling this function. Furthermore, your component may not destroy any data in the destination file. If you cannot add data to the specified file, return an appropriate error.
If your component can write data to a file, be sure to set the canMovieExportFiles flag in your component's componentFlags field.
Your component must be prepared to perform this function at any time. You should not expect that any of your component's configuration functions will be called first.
| Previous | Chapter contents | Chapter top | Section top | Next |